#ifndef __CONNECTSOCKET_HPP__
#define __CONNECTSOCKET_HPP__

#include "IP.hpp"
#include "TCPConnection.hpp"

/**
 * Utility class to open a TCPConnection
 */
class ConnectSocket {

	private:
		int fd; /**< underlying file descriptor */
		IP destinationIP;
		unsigned int port;

	public:
		ConnectSocket(const IP& destinationIP, unsigned int port);

		ConnectSocket(const std::string& hostname, unsigned int port);

		TCPConnection connect();

};
#endif

